import java.util.*;

public class Main10 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        ArrayList<Integer> list = new ArrayList();
        for(int i = 0; i < 3; i++) {
            int n = sc.nextInt();
            for(int p = 0; p < n; p++) {
                list.add(sc.nextInt());
            }
        }

        list.sort(Comparator.reverseOrder());

        String s = "";
        for(int num : list) {
            s += num + " ";
        }

        System.out.println(s.substring(0, s.length()-1));
    }
}

